﻿
namespace BLPicker
{
    using System.Diagnostics.Contracts;
    using BLPicker.CodeContracts;

    [ContractClass(typeof(BusinessLayerFactoryContract<>))]
    /// <summary>
    /// Interface for getting instance of business layer.
    /// </summary>
    /// <typeparam name="TBusinessLayer">Type of business layer.</typeparam>
    public interface IBusinessLayerFactory<out TBusinessLayer>
    {

        /// <summary>
        /// Gets unnamed instance of business layer.
        /// </summary>
        /// <returns>The unnamed instance of business layer.</returns>
        TBusinessLayer GetBusinessLayer();

        /// <summary>
        /// Gets named instance of business layer.
        /// </summary>
        /// <param name="name">Name of dependency.</param>
        /// <returns>The named instance of business layer.</returns>
        TBusinessLayer GetBusinessLayer(string name);

    }
}
